hvmloader/smbios: Change strncpy to memcpy for anchor strings
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 27 Sep 2013 08:15:28 +0000 (10:15 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 27 Sep 2013 08:15:28 +0000 (10:15 +0200)
commit62466514cc419152fa2f33dc9aa986d0a2fc519a
treeb34f0b35677ce7db95a4c58edaec1b08db310faa
parent0af438757d455f8eb6b5a6ae9a990ae245f230fd
hvmloader/smbios: Change strncpy to memcpy for anchor strings

Coverity complains about the use of strncpy() to completely fill the anchor
strings, resulting in an unterminated string.

Although the strncpy result is correct, the anchor strings are not strings in
the C sense, and use of memcpy is the prevaling style elsewhere in hvmloader
anyway.

While tidying up the style in this function, also remove some trailing
whitespace and gratuitous cast.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/smbios.c